write smart contract tests in js